package br.com.insight.consultoria.negocio.bo;

import br.com.insight.consultoria.entity.Area;
import br.com.insight.consultoria.erro.exception.InsightConstants;
import br.com.insight.consultoria.erro.exception.InsightException;
import br.com.insight.consultoria.erro.exception.SistemaException;
import br.com.insight.consultoria.integracao.dao.interfacedao.AreaDAO;
import br.com.insight.consultoria.negocio.bo.interfacebo.AreaBO;

public class AreaImpBO implements AreaBO{

	private AreaDAO areaDAO;
	
	@Override
	public Area getArea(Long id) throws InsightException {
	
		Area area=null;
	
	try{	
		
		area=getAreaDAO().getArea(id);
		
	}catch(InsightException exception){
		
		throw exception;
		
	}catch(Exception exception){
		
		throw new SistemaException(InsightConstants.MENSAGEM_ERRO_NAO_TRATADO,exception);
		
	}
		
		return area;
	
	}

	
	public AreaDAO getAreaDAO() {
		return areaDAO;
	}

	public void setAreaDAO(AreaDAO areaDAO) {
		this.areaDAO = areaDAO;
	}
	
	
	
}
